Internet Protocol (IP) Multimedia Subsystem (IMS) and Long Term Evolution (LTE) network technologies enable a user device to communicate with another user device or network device/application (e.g., a voice mail system) for voice or data services by establishing a communication session, between two ends, that consists of a signaling path and a media path. Many of these communication sessions involve the use of a session border controller (SBC), supporting inter-carrier or inter-technology inter-working and topology hiding functions, and/or a media resource function (MRF), providing a transcoding (e.g., encoding and decoding) function. In a large scale network implementation, there are usually many instances of the same network elements (e.g., packet data network (PDN) gateway (PGW), SBC, MRF, etc.) deployed in different locations. Today, there is no existing solution for a call session control function (CSCF) to select a SBC or a MRF so that the media path, carrying the real-time transport protocol (RTP) data packets between the two ends of a communication session, is as short as possible. As a result, user data are being hauled over a long distance causing degraded quality of service.